package com.tedu.springdemo.day01;

import org.springframework.beans.factory.FactoryBean;

public class NetConSpringFactory implements FactoryBean<NetConnection> {
    @Override
    public NetConnection getObject() throws Exception {
        NetConnection nc = new NetConnection();
        nc.load();
        nc.ping();
        nc.conn();
        return nc;
    }

    @Override
    public Class<?> getObjectType() {
        return NetConnection.class;
    }


    public boolean isSingleton() {
        return true;
    }

}
